<?php
class template_listing extends theme
{
	
	protected function head()
	{
	?>
<!--[if IE]>
<script type="text/javascript" language="javascript" src="js/excanvas.compiled.js"></script>
<![endif]-->
<script type="text/javascript" language="javascript" src="js/jquery.bt.min.js"></script>

<link type="text/css" rel="stylesheet" href="templates/product/css/listing.css">
<script type="text/javascript" language="javascript" src="templates/product/js/listing.js"></script>
	<?php
	}

	protected function center()
	{



if(count($this->get('categories')))
{
foreach($this->get('categories') as $category)
{
?>
	<div class="center-title"><?php echo $category->name; ?></div>
	<div class="center-content">
		<div class="products">
		<?php
		if(count($this->get('products')))
		{
		echo '<ul>';
		foreach($this->get('products') as $product)
		{
			if($product->category_id==$category->id)
			{
			?>
			<li class="product">
				<div class="image" title="storage/product/large_<?php echo $product->image; ?>">
					<a href="<?php echo url('./?controller=product&task=detail&product_id='.$product->id.'&menu_id='.$this->get('menu_id') ); ?>" title="<?php echo $product->name; ?>">
					<img src="storage/product/<?php echo $product->image; ?>" width="100" height="100" border="0" alt="<?php echo $product->name; ?>" />
					</a>
				</div>
				<div class="name">
					<a href="<?php echo url('./?controller=product&task=detail&product_id='.$product->id.'&menu_id='.$this->get('menu_id') ); ?>" title="<?php echo $product->name; ?>">
					<?php echo $product->name; ?>
					</a>
				</div>
			</li>
			<?php
			}
		}
		echo '</ul>';
		}
		?>
		<div class="clrl"></div>
		</div>
	</div>
<?php
}
}



	}		
		

}
?>